<template>
<div tabindex="-1" class="rx-input-date">
  <div @click="click">
    <input type="text" :value="value" readonly class="rx-input-date__input">
  </div>
</div>
</template>

<script>

export default {
  name:'rx-input-date',
  props:['value'],
  methods:{
    click(event){

      this.$rxPickDate({
        el:this.$el,
        event
      }).then((date)=>{
       this.$emit('input',date)
      })
    }
  }
}
</script>

<style>
.rx-input-date{
  display: inline-block;
}
.rx-input-date__input{
  outline: none;
}
</style>
